<?php
$dl=isset($_COOKIE)?$_COOKIE:'';
require('../../public/zscg.php');
require('../../public/local.php');
$res=select2($con,'user','where `id` = 1')[0];
if($dl['username']!= $res['nicheng'] && $dl['password'] != 'pwd'){
   echo "<script>alert('请先登录');window.location.href='/admin/index.php'</script>";
 }
?>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="/admin/public/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="/admin/public/css/main.css"/>
    <link rel="stylesheet" href="/admin/public/css/password.css" type="text/css">
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="/admin/guanli.php">首页</a></li>
                <li><a href="/home/index.php" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="#">管理员</a></li>
                <li><a href="/admin/password/index.php">修改密码</a></li>
                <li><a href="/admin/logout.php">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
                    <ul class="sub-menu">
                        <li><a href="/admin/user/index.php"><i class="icon-font">&#xe006;</i>会员管理</a></li>
                        <li><a href="/admin/fenlei/index.php"><i class="icon-font">&#xe006;</i>栏目管理</a></li>
                        <li><a href="/admin/wenzhang/index.php"><i class="icon-font">&#xe012;</i>文章管理</a></li>
                        <li><a href="/admin/pinglun/index.php"><i class="icon-font">&#xe052;</i>评论管理</a></li>
                        <li><a href="/admin/guanggao/index.php"><i class="icon-font">&#xe033;</i>新闻公告</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>